import React from "react";
import { View, TextInput } from "react-native";
import { Ionicons } from "@expo/vector-icons";
// @ts-ignore
import { styles } from "../../styles/index.style";
import { TwitterPalette } from "@/constants/styles/twitter.style";
import { SearchInputProps } from "../../types/index";

const SearchInput: React.FC<SearchInputProps> = ({ value, onChange }) => {
  return (
    <View style={styles.searchBar}>
      <Ionicons name="search" size={20} color={TwitterPalette.textSecondary} />
      <TextInput
        onChangeText={onChange}
        value={value}
        placeholder="搜索账号/邮箱"
        placeholderTextColor={TwitterPalette.textSecondary}
        style={styles.searchInput}
      />
    </View>
  );
};
export default SearchInput;
